﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SimpleRadar.AppClass
{
    public class Draw
    {
        public System.Windows.Shapes.Path drawQuarterCircle(Point angle, Point startPoint, Point Arc, int Size)
        {
            PathFigure pthFigure1 = new PathFigure();
            pthFigure1.StartPoint = startPoint;// starting cordinates of arcs
            ArcSegment arcSeg1 = new ArcSegment();
            arcSeg1.Point = Arc;   // ending cordinates of arcs
            arcSeg1.Size = new Size(Size, Size);

            arcSeg1.IsLargeArc = false;
            arcSeg1.SweepDirection = SweepDirection.Clockwise;
            arcSeg1.RotationAngle = 20;
            PathSegmentCollection myPathSegmentCollection1 = new PathSegmentCollection();
            myPathSegmentCollection1.Add(arcSeg1);
            LineSegment lineSeg = new LineSegment();
            /**/
            lineSeg.Point = angle;
            myPathSegmentCollection1.Add(lineSeg);
            pthFigure1.Segments = myPathSegmentCollection1;


            PathFigureCollection pthFigureCollection1 = new PathFigureCollection();
            pthFigureCollection1.Add(pthFigure1);

            PathGeometry pthGeometry1 = new PathGeometry();
            pthGeometry1.Figures = pthFigureCollection1;
            System.Windows.Shapes.Path arcPath1 = new System.Windows.Shapes.Path();
            arcPath1.Data = pthGeometry1;
            arcPath1.Fill = new SolidColorBrush(Colors.Green);
            arcPath1.Opacity = 0.5;
            return arcPath1;
        }
    }
}
